package com.zhangbo.study.designpatternlearning.combination;

import java.util.Iterator;
import java.util.List;

public class PanckeHouseMenuIterator implements Iterator<MenuItem> {

    private Iterator<MenuItem> iterator;

    public PanckeHouseMenuIterator(List<MenuItem> menuItems) {
        this.iterator = menuItems.iterator();
    }

    @Override
    public boolean hasNext() {
        return iterator.hasNext();
    }

    @Override
    public MenuItem next() {
        return iterator.next();
    }
}
